<!DOCTYPE html>

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<link rel="stylesheet" type="text/css" href="style.css">
<title>Captive</title>
<script type="text/javascript" src="jquery-1.9.1.min.js"></script>


<script>

	var init = 5;
	
	$(document).ready(
		function() {
			document.getElementById("dialog").style.display="inherit";
			document.getElementById("background").style.display="inherit";
			document.getElementById("peopleimage").src="images/stephen.png";
			document.getElementById("dialog").innerHTML = "Stephen shouts: <br/>I DON'T BELIEVE YOU! You killed my father and now I'm going to kill your son!";
			$("#dialog").click(dialog1);
		}
	);
	
	function dialog1()
	{
		$("#dialog").unbind('click');
		document.getElementById("peopleimage").src="images/child.png";
		document.getElementById("dialog").innerHTML = "Jimmy says: <br/>DAD!!";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(dialog2);
		}
	}
	
	function dialog2()
	{
		$("#dialog").unbind('click');
		document.getElementById("peopleimage").src="images/police.png";
		document.getElementById("dialog").innerHTML = "Policeman says: <br/>Don't move or I will shoot!";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(dialog3);
		}
	}
	
	function dialog3()
	{
		$("#dialog").unbind('click');
		document.getElementById("peopleimage").src="images/stephen.png";
		document.getElementById("dialog").innerHTML = "Stephen says: <br/>I don't expect to get out of this alive in the first place, so shoot!! Come on!!";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(dialog4);
		}
	}
	
	function dialog4()
	{
		$("#dialog").unbind('click');
		document.getElementById("peopleimage").src="images/blank.png";
		document.getElementById("dialog").innerHTML = "I say: <br/>Don't shoot! Stephen, please let Jimmy go!";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(dialog5);
		}
	}
	
	function dialog5()
	{
		$("#dialog").unbind('click');
		document.getElementById("peopleimage").src="images/stephen.png";
		document.getElementById("dialog").innerHTML = "Stephen says: <br/>I won't....I want you to know how painful it is to lose a family member...<br/>I'm sorry for dragging you into this, Jimmy. You have a horrible father, so I'm doing you a favor.";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(dialog6);
		}
	}
	
	function dialog6()
	{
		$("#dialog").unbind('click');
		document.getElementById("peopleimage").src="images/child.png";
		document.getElementById("dialog").innerHTML = "Jimmy says: <br/>You're crazy!! LET ME GO!!";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(dialog7);
		}
	}
	
	function dialog7()
	{
		$("#dialog").unbind('click');
		document.getElementById("peopleimage").src="images/stephen.png";
		document.getElementById("dialog").innerHTML = "Stephen mumbles to himself: <br/>Father, you will be proud of me, right? I will be with you very soon...";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(dialog8);
		}
	}
	
	function dialog8()
	{
		$("#dialog").unbind('click');
		document.getElementById("peopleimage").src="images/blank.png";
		document.getElementById('audiotag1').play();
		document.getElementById("dialog").innerHTML = "(Stephen jumps into the ocean while holding Jimmy)";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(dialog9);
		}
	}
	
	function dialog9()
	{
		$("#dialog").unbind('click');
		document.getElementById("dialog").innerHTML = "I say: <br/>NOOOOO! JIMMY!!!";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(dialog10);
		}
	}
	
	function dialog10()
	{
		$("#dialog").unbind('click');
		$("#dialog").fadeOut(5000,nextscene);
	}
	
	
	
	function nextscene()
	{
			window.location = "inter5.php";
	}
	
	
</script>



</head>

<body>


<div id="container">
	<div id="background"><img src="images/harbor.jpg" /></div>
	<div id="dialog">
	</div>
	<div id="people"><img id="peopleimage" src=""></div>
</div>

<audio id="audiotag1" src="audios/water.mp3" preload="auto"></audio>


</body>
</html>